#ifndef ABS_H
#define ABS_H

#include <QObject>
#include <QAbstractVideoSurface>
#include <QCamera>
#include <QCameraInfo>
#include <QDebug>
#include <QImage>



class Abs : public QAbstractVideoSurface
{
    Q_OBJECT
public:
    Abs(QObject* parent = nullptr);

    virtual bool present(const QVideoFrame &frame);

    virtual QList<QVideoFrame::PixelFormat> supportedPixelFormats(QAbstractVideoBuffer::HandleType type = QAbstractVideoBuffer::NoHandle) const;
    void camera_start();
    void camera_stop();

signals:
    void sndImage(QImage& image);

private:
    QCamera* camera;
};

#endif // ABS_H
